package org.argeproje.resim.ui.parts;

import java.security.InvalidParameterException;

import org.eclipse.jface.viewers.ICellEditorValidator;

public class CellValidatorFactory {
	public final static int INTEGER_VALIDATOR = 1;
	public final static int DOUBLE_VALIDATOR = 2;
	public final static int FILE_PATH_VALIDATOR = 3;
	
    public static ICellEditorValidator Create(int ValidatorType)
    {
    	switch(ValidatorType)
    	{
    	case INTEGER_VALIDATOR: return new CellIntegerValidator();
    	case DOUBLE_VALIDATOR: return new CellDoubleValidator();
    	case FILE_PATH_VALIDATOR: return new CellStringValidator();    		
    	}
    	throw new InvalidParameterException("validator type is not supported");
    }
}
